package net.wanho.mapper;


import net.wanho.dto.UserDTO;
import net.wanho.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2024-12-16 15:13
 * Description：<描述>
 */
// @Repository
@Mapper
public interface UserMapper {

    void insertUser(User user);

    void updateUser(User user);

    void deleteById(Integer id);

    User selectById(Integer id);

    List<User> selectAll();

    List<User> selectByUsername(String username);

    public User selectByUsernameAndPassword(@Param("username") String username,@Param("password") String password);

    public User selectByUsernameAndPassword2(UserDTO userDTO);

    User selectById2(Integer id);

    User selectById3(Integer id);


    List<User> selectByParams(User user);

    List<User> selectByParams2(User user);

    List<User> selectByIds(List<Integer> ids);

    void deleteBatch(List<Integer> ids);

}
